package io.sdph.userprofile.model;

import java.util.ArrayList;
import java.util.List;

/**
 * Bean reprezentujący użytkownika systemu.
 * 
 * @author Adrian Szwajkowski, Tomasz Korpowski
 * @since 0.0.1
 */
public class User {

	// Identyfikator użytkownika.
	private final String id;
	// Login użytkownika.
	private String login;
	// Nazwa użytkownika.
	private String userName;
	// Imię osoby kontaktowej.
	private String firstName;
	// Nazwisko osoby kontaktowej.
	private String lastName;
	// Numer licencji przedstawiciela handlowego. (tylko dla typu SALESMAN)
	private String licenseNumber;
	// Typ użytkownika.
	private UserType userType;
	// Lista dodatkowych uprawnień.
	private List<UserPermission> permissions = new ArrayList<UserPermission>();
	// Adres użytkownika.
	private Address address = new Address();
	// NIP użytkownika
	private String nip;
	// REGON użytkownika
	private String regon;

	private boolean filled = false;

	public User(String id) {
		this.id = id;
	}

	public User(String id, String login, String userName, String firstName,
			String lastName, String licenseNumber, UserType userType,
			List<UserPermission> permissions, Address address, String nip,
			String regon) {
		this.id = id;
		this.login = login;
		this.userName = userName;
		this.firstName = firstName;
		this.lastName = lastName;
		this.licenseNumber = licenseNumber;
		this.userType = userType;
		this.permissions = permissions;
		this.address = address;
		this.nip = nip;
		this.regon = regon;
	}

	public String getId() {
		return id;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getLicenseNumber() {
		return licenseNumber;
	}

	public void setLicenseNumber(String licenseNumber) {
		this.licenseNumber = licenseNumber;
	}

	public UserType getUserType() {
		return userType;
	}

	public void setUserType(UserType userType) {
		this.userType = userType;
	}

	public List<UserPermission> getPermissions() {
		return permissions;
	}

	public void setPermissions(List<UserPermission> permissions) {
		this.permissions = permissions;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public String getNip() {
		return nip;
	}

	public void setNip(String nip) {
		this.nip = nip;
	}

	public String getRegon() {
		return regon;
	}

	public void setRegon(String regon) {
		this.regon = regon;
	}

	public boolean isFilled() {
		return filled;
	}

	public void setFilled(boolean filled) {
		this.filled = filled;
	}
}
